
package edu.weber.bookstore.models;

import edu.weber.bookstore.database.Book;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 
 * 
 */
public class BooksIndexModel extends ViewModel
{
	private List<Book> _books;
	
	/**
	 * Constructor for the data on the books index page.
	 * @param books list of books to be displayed.
	 */
	public BooksIndexModel(List<Book> books)
	{
		_books = books;
	}
	
	@Override
	public Map<String, Object> getMap()
	{
		Map<String, Object> map = new HashMap<String, Object>();
		
		map.put("books", _books);
		
		map.putAll(super.getMap());
		return map;
	}
}
